package com.max.backendserver.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author max
 * @date 2024年08月23日 14:26
 */
@RestController
@RequestMapping("/home")
@Slf4j
public class MainPageController {

    @GetMapping("/hello")
    public String hello(@RequestHeader(name = "gray", required = false, defaultValue = "false") boolean gray) {
        log.info("gray? {}", gray);
        return "hello from server2";
    }
}
